package emu.decvices.bus;

import java.io.Serializable;

public class IRQLineDevice implements Serializable {
    private boolean irqEnable;//中断请求使能
    private boolean irq;

    /**
     *  请求中断
     */
    public void irq(){
        if(irqEnable) {
            irq = true;
        }
    }
    public void irqEnable(){
        irqEnable = true;
    }

    public void irqDisable(){
        irqEnable = false;
    }

    public boolean needIRQ(){
        return irq;
    }

    public void acknowledge(){
        irq = false;
    }

    public boolean isIrqEnable() {
        return irqEnable;
    }
}
